app.controller('setupPageCtrl',function($scope,$ionicConfig,$state, $rootScope,PopupService,$stateParams,$http,$myconfig,$timeout){

    $scope.getOutTohome = localStorage.getItem('user');
    //t退出登录
    $scope.getOut = function(){
        localStorage.removeItem('user');
        localStorage.removeItem('wxinfo');
        localStorage.removeItem('token');
        localStorage.removeItem('refresh_token');

        // localStorage.clear();
        $rootScope._RootUser = '';
        $state.go('app.home');
    };


    $scope.$on('$ionicView.enter', function(){

        $ionicConfig.views.swipeBackEnabled(false);

    });

});
